+2004-07-13 Federico Mena Quintero <federico@ximian.com>
+
+ * gtk/gtkfilechooserdefault.c (shortcuts_activate_volume): Set a
+ busy cursor while mounting the volume. Also, ref the chooser
+ while mounting, as we may re-enter. Fixes #139376.
+
2004-07-13 Matthias Clasen <mclasen@redhat.com>
* gtk/gtktreeview.c (gtk_tree_view_adjustment_changed):
+2004-07-13 Federico Mena Quintero <federico@ximian.com>
+
+ * gtk/gtkfilechooserdefault.c (shortcuts_activate_volume): Set a
+ busy cursor while mounting the volume. Also, ref the chooser
+ while mounting, as we may re-enter. Fixes #139376.
+
2004-07-13 Matthias Clasen <mclasen@redhat.com>
* gtk/gtktreeview.c (gtk_tree_view_adjustment_changed):
+2004-07-13 Federico Mena Quintero <federico@ximian.com>
+
+ * gtk/gtkfilechooserdefault.c (shortcuts_activate_volume): Set a
+ busy cursor while mounting the volume. Also, ref the chooser
+ while mounting, as we may re-enter. Fixes #139376.
+
2004-07-13 Matthias Clasen <mclasen@redhat.com>
* gtk/gtktreeview.c (gtk_tree_view_adjustment_changed):
+2004-07-13 Federico Mena Quintero <federico@ximian.com>
+
+ * gtk/gtkfilechooserdefault.c (shortcuts_activate_volume): Set a
+ busy cursor while mounting the volume. Also, ref the chooser
+ while mounting, as we may re-enter. Fixes #139376.
+
2004-07-13 Matthias Clasen <mclasen@redhat.com>
* gtk/gtktreeview.c (gtk_tree_view_adjustment_changed):
{
GtkFilePath *path;
+ /* We ref the file chooser since volume_mount() may run a main loop, and the
+ * user could close the file chooser window in the meantime.
+ */
+ g_object_ref (impl);
+
if (!gtk_file_system_volume_get_is_mounted (impl->file_system, volume))
{
GError *error;
+ gboolean result;
+
+ set_busy_cursor (impl, TRUE);
error = NULL;
- if (!gtk_file_system_volume_mount (impl->file_system, volume, &error))
+ result = gtk_file_system_volume_mount (impl->file_system, volume, &error);
+
+ if (!result)
{
char *msg;
error_message (impl, msg);
g_free (msg);
g_error_free (error);
-
- return;
}
+
+ set_busy_cursor (impl, FALSE);
+
+ if (!result)
+ goto out;
}
path = gtk_file_system_volume_get_base_path (impl->file_system, volume);
change_folder_and_display_error (impl, path);
gtk_file_path_free (path);
+
+ out:
+
+ g_object_unref (impl);
}
/* Opens the folder or volume at the specified index in the shortcuts list */